package com.sc.commons.base.utils.except;

import java.io.EOFException;

/**
 * @author
 */
public class ScExceptionUtils {
    /**
     * NullPointException 空指针异常 快速返回类
     * @param message
     * @return
     */
    public static ScException np(String message){
        return new ScException(506, message, new NullPointerException(message));
    }
    /**
     * end of stream Exception 空指针异常 快速返回类
     * @param message
     * @return
     */
    public static ScException eof(String message){
        return new ScException(507, message, new EOFException(message));
    }

    /**
     * 错误的参数异常
     * @param message
     * @return
     * @since 0.0.1
     * @author makai@comleader.com.cn
     */
    public static ScException args(String message){
        return new ScException(400, message, new IllegalArgumentException(message));
    }
}
